package com.demo.userprofile.component.service;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.userprofile.component.dao.UserprofileTestMapper;
import com.demo.userprofile.component.dao.model.UserprofileTest;

/**
 * MySQL测试代码
 *
 * @author userprofile_demo
 */
@Service
public class MySQLTestService extends ServiceImpl<UserprofileTestMapper, UserprofileTest> {

    // 添加条目内容
    public boolean addTestItem(String name) {
        UserprofileTest newItem = new UserprofileTest();
        newItem.setName(name);
        newItem.setAge(1);
        return baseMapper.insert(newItem) > 0;
    }
}
